#include <TypeLength.h>
#include <math.h>

const int TypeLength::m_Max = 100;
const int TypeLength::m_Precision = 100;

TypeLength::TypeLength(double value):m_Value(value)
{

};

double TypeLength::getInputValue(void) const
{
	return ((m_Value>m_Max)||(m_Value<0))?0:(((double)(int)(m_Value*m_Precision))/m_Precision);
}

double TypeLength::getOutputValue(void) const
{
	return (round(m_Value*m_Precision))/m_Precision;
}
